package Object_Class;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

public class Map_Test {

	public static void main(String[] args) {
		HashMap<Integer, String> hashMap = new HashMap<Integer, String>();
		LinkedHashMap<Integer, String> lingedhashmap = new LinkedHashMap<Integer, String>();
		TreeMap<Integer, String> treemap = new TreeMap<Integer, String>();
		treeMap(treemap);
	}


	public static void treeMap(Map<Integer, String> map) {

		map.put(2, "two");
		map.put(1, "one");
		map.put(5, "five");
		map.put(6, "six");
		map.put(9, "nine");
		map.put(0, "zero");
		map.put(3, "three");

		for (Map.Entry<Integer, String> entry : map.entrySet()) {
			System.out.println(entry.getKey() + ":" + entry.getValue());
		}

	}

}
